home *** CD-ROM | disk | FTP | other *** search
/ The Book of Tells / The Book of Tells.iso / vidgal.dir / 00393_Script_393 < prev    next >
Text File  |  1994-09-22  |  2KB  |  78 lines

  1. on startMovie
  2.   
  3.   set the puppet of sprite 1 to TRUE
  4.   set the puppet of sprite 2 to TRUE
  5.   set the visible of sprite 2 to FALSE
  6.   global lineNum
  7.   
  8. end startMovie
  9.  
  10.  
  11. -- ******************************************************
  12. -- Name: menuSelect
  13. -- Description: Checks the position of the mouse in a text field
  14. -- and highlights the current line.  Pass it the number of the
  15. -- text field.  The variable lineNum is used internally to
  16. -- stop looping to prevent the highlight from flashing and can
  17. -- also be used externally to pass where the mouse was when the
  18. -- user released the mouse button.
  19. --                      
  20. -- Example: checkMouse {castNumber)
  21. -- ******************************************************
  22.  
  23. on menuSelect castNumber
  24.   
  25.   global lineNum
  26.   set lineNum = 0
  27.   set hiliteSet = 0
  28.   set mousePos = 0
  29.   
  30.   repeat while the stillDown
  31.     
  32.     if the mouseCast = (castNumber) then
  33.       
  34.       
  35.       if lineNum = (the mouseLine) and the mouseV = mousePos then
  36.         
  37.         nothing
  38.         
  39.       else if the mouseLine = -1 then
  40.         set the hilite of field (castNumber) to 0
  41.         set lineNum = 0
  42.         
  43.       else if the mouseV > 135 then
  44.         set the hilite of field (castNumber) to 0
  45.         set lineNum = 0
  46.         
  47.       else if the mouseV < 60 then
  48.         set the hilite of field (castNumber) to 0
  49.         set lineNum = (the mouseLine)
  50.         
  51.       else if the mouseH < 95 then
  52.         set the hilite of field (castNumber) to 0
  53.         set lineNum = 0
  54.         
  55.       else if the mouseH > 180 then
  56.         set the hilite of field (castNumber) to 0
  57.         set lineNum = 0
  58.         
  59.         
  60.       else 
  61.         hilite line (the mouseLine) of field (castNumber)
  62.         set lineNum = (the mouseLine)
  63.         set mousePos = the mouseV
  64.         
  65.       end if
  66.       
  67.     else
  68.       set the hilite of field (castNumber) to 0
  69.       set lineNum = 0
  70.       
  71.     end if
  72.     
  73.   end repeat
  74.   
  75. end checkMouse
  76.  
  77.  
  78.